// 站点配置
import { resolve } from 'path'
import { defineConfig } from 'vitepress'
import { withBase, useData } from 'vitepress'
import path from 'path';
// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "知识库",
  description: "The playground for Documate vue component",
  head: [['link', { rel: 'icon', href: '/favicon.ico' }]],
  // base:"", //站点部署
  // srcDir:"/docs",
markdown:{
  config(md) {
      md.options.html=true
  },
},
cleanUrls:true,//简介url去掉.html后缀
  vite: {
    resolve: {
      alias: {
        '@documate/vue': path.resolve(__dirname, '../../components'), //path处理打包后的路径不正确
      },
    },
  },
  themeConfig: { //主题配置
    logo:"/favicon.ico",
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: 'Home', link: '/' },
      { text: 'Examples', link: '/markdown-examples' },
      { text: 'My', link: '/my' },
    ],

    sidebar: [
      {
        text: 'Examples',
        items: [
          { text: 'Markdown Examples', link: '/markdown-examples' },
          { text: 'Runtime API Examples', link: '/api-examples' }
        ]
      }
    ],
    footer: {
      message: "Copyright ©  2024 present Hanhai Ruizhi.",
      copyright: 'Copyright © 2024-present 翰海睿智'

    },

    socialLinks: [
      { icon: 'github', link: 'https://github.com/vuejs/vitepress' }
    ],

    search: {
      provider: 'local',
    },
  }
})
